import java.io.FileNotFoundException;
import java.io.PrintStream;

public class OStream {
	public static void main(String[] args) {
		PrintStream printStream;
		String fileName="loc.txt";
		try{
			printStream=new PrintStream(fileName);
			printStream.print(1+"\t");
			printStream.print(2+"\t");
			printStream.close();
		}
		catch (FileNotFoundException fileNotFoundException){
			System.out.println("Cannot write into file"+fileName);
		}
	}
}
